From 29d9ceeea67a5965a95e724056b195194b706546 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 22 Jan 2006 21:45:08 +0000 Subject: [PATCH] Make sed to findstr translation more compatible. Add findstr option /R for regular expressions. --- gpsbabel/mingw/mkwintesto.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gpsbabel/mingw/mkwintesto.c b/gpsbabel/mingw/mkwintesto.c index 531bacb48..cd87679db 100644 --- a/gpsbabel/mingw/mkwintesto.c +++ b/gpsbabel/mingw/mkwintesto.c @@ -334,8 +334,8 @@ int argc, } /* Is this one of the test sequences where we prepare some data by using sed? */ /* we only cater for sed that removes lines - this is only windows after all */ - if (strncmp("sed '/^L",acLineIn,8) == 0) { - pcTerm = strstr(acLineIn+8,"/d'"); + if (strncmp("sed '/",acLineIn,6) == 0) { + pcTerm = strstr(acLineIn+6,"/d'"); /* Did we find a terminator in the string? */ if ((pcTerm != NULL) && ((pcTerm - acLineIn) < LINELENGTH)) { @@ -344,10 +344,10 @@ int argc, f_outputLine(pfTestoOut, "@echo."); iEchoLevel = 0; } - iStart = 8; - strcat(acLineOut, "FINDSTR /V \""); - iTarget = 12; - for (iThisChar=8; iThisChar<(pcTerm - acLineIn); iThisChar++) { + iStart = 6; + strcat(acLineOut, "FINDSTR /V /R /C:\""); + iTarget = 18; + for (iThisChar=6; iThisChar<(pcTerm - acLineIn); iThisChar++) { acLineOut[iTarget++] = acLineIn[iStart++]; } acLineOut[iTarget++] = (char)0; -- 2.30.2